import axios from '../../utils/axios/request'


// 用户登录
export function userLoginApi(data) {
    return axios({
        url: '/users/user-login',
        method: 'post',
        data
    })
}

// 获取用户信息
export function getUsersInfoApi(params) {
    return axios({
        url: '/users/user-info',
        method: 'get',
        params
    })
}

// 获取users列表
export function getListApi(params) {
    return axios({
        url: '/users/user-list',
        method: 'get',
        params
    })
}

// 新增用户
export function addUserApi(data) {
    return axios({
        url: "/users/save-user",
        method: 'post',
        data
    })
}

// 删除用户
export function deleteUserApi(params) {
    return axios({
        url: '/users/delete-user',
        method: 'get',
        params
    })
}

// 新增用户
export function updateUserApi(data) {
    return axios({
        url: '/users/update-user',
        method: 'post',
        data
    })
}

// users头像上传
export function uploadApi(data) {
    return axios({
        url: "/users/upload-avatar",
        method: 'post',
        data
    })
}

// 获取msbd列表/classify列表
export function getMsbdListApi(params) {
    return axios({
        url: '/msbd/get-msbd',
        method: 'get',
        params
    })
}

// 获取classify列表
export function getClassifyApi(params) {
    return axios({
        url: '/classify/get-classify',
        method: 'get',
        params
    })
}

// 新增classify列表
export function addClassifyApi(data){
    return axios({
        url: '/classify/add-classify',
        method: 'post',
        data
    })
}

// 修改classify 列表
export function updateClassifyApi(data){
    return axios({
        url: '/classify/update-classify',
        method: 'post',
        data
    })
}

// 删除classify 列表
export function deleteClassifyApi(params){
    return axios({
        url: '/classify/delete-classify',
        method: 'get',
        params
    })
}

// 获取msbd 列表

export function getMsbdDataListApi(params) {
    return axios({
        url:'/msbd/get-msbd',
        method:'get',
        params
    })
}

// 新增msbd 列表

export function postMsbdDataListApi(data){
    return axios({
        url:'/msbd/save-msbd',
        method:'post',
        data
    })
}

// 删除msbd 类别

export function deleteMsbdDataListApi(params){
  
    return axios({
        url:'/msbd/delete-msbd',
        method:'get',
        params
    })
}

// 修改用户

export function updateMsbdDataListApi(data){
   return axios({
        url:'/msbd/update-msbd',
        method:'post',
        data
    })
}
